/*
 * Ethan Levine
 * 
 * The contents of this file are subject to the GNU General Public
 * License (GPL) v2.  The full contents of this license can be
 * found at Mathma's website, http://www.codeplex.com/mathma/license
 */

package mathma.core.expr;

import mathma.core.real.FiniteReal;
import mathma.core.real.Real;

/**
 * @since 0.1.5
 * @author Ethan Levine
 */
public class RealVariable extends Variable<Real> {
    
    public RealVariable(String symbol) {
        super(symbol, Real.Type);
    }
    
    public RealVariable(String symbol, String desc) {
        super(symbol, desc, Real.Type);
    }
    
    public RealVariable() {
        super(Real.Type);
    }
    
    @Override
    public Expression<Real> differentiate(Variable<Real> var) {
        if (equals(var)) {
            return Real.ONE;
        } else {
            return Real.ZERO;
        }
    }
}
